/* CSci4061 F2012 Assignment 3
 * section: 3
 * date: 11/10/12
 * name: Jeff Goin, Jack Jones
 * id: 2999885, 4220764 */

#include <sys/time.h>
#include <signal.h>

#include <stdio.h>
#include <stdlib.h>

#define INTERVAL 0
#define INTERVAL_USEC 800000
#define SZ 64
#define how 8

typedef struct node node;

struct node{
        int size; //Size of data entered
	int nodeid; //Which node this is 
	node *next; //Points to next node
	void *data; //Pointer to part of the allocated block of memory
	int flag; //We used flag to indicate whether a chunk is free or not.
};

typedef struct {
        int size; //Size of the block of memory
        int left; //How much is not taken
        node *head; //Pointer to block of memory
        node *last; //Pointer to most recently added
}mm_t;

int mm_init (mm_t *MM, int tsz);
void* mm_get (mm_t *MM, int neededSize);
void mm_put (mm_t *MM, void *chunk);
void  mm_release (mm_t *MM);
double comp_time (struct timeval times, struct timeval timee);
